/* 
 * File:   ThreadRdidCard.h
 * Author: batista
 *
 * Created on 17 de Março de 2013, 17:44
 */

#ifndef THREADRDIDCARD_H
#define	THREADRDIDCARD_H
#include <vector>
#include <cstring>
#include <string>
#include <iostream>
#include <ping.h>
#include <ucommon/ucommon.h>
//
#include "ClientSocket.h"
#include "SocketException.h"
#include "TimeUtil.h"
#include "DirFile.h"
#include "ShowMsg.h"
#include "Card.h"
#include "DbConn.h"

using namespace std;
using std::string;

//using namespace UCOMMON_NAMESPACE;
using namespace ucommon;

class ThreadRFIDCard : private ShowMsg, public JoinableThread {
public:
    ThreadRFIDCard();
    virtual ~ThreadRFIDCard();
    //
    void run(void);
    //
    
    DbConn* GetDbconn() const {
        return dbconn;
    }

    void SetDbconn(DbConn* dbconn) {
        this->dbconn = dbconn;
    }

    char* getWardIPPds() const {
        return wardIPPds;
    }

    void setWardIPPds(char* wardIPPds) {
        this->wardIPPds = wardIPPds;
    }

    DirFile* getDirfl() const {
        return dirfl;
    }

    void setDirfl(DirFile* dirfl) {
        this->dirfl = dirfl;
    }

    //
private:
    DbConn *dbconn;
    TimeUtil *timet;
    DirFile *dirfl;
    Card *card;

private:
  char *wardIPPds;
  //
  /**
   * Metodo Principalde 
   * captura dos dados
   * para os cartoes
   */
  void RunCapCards();
  
  /**
   * Metodo para teste de captura
   */
  void TestCap();
  
};

#endif	/* THREADRDIDCARD_H */

